package com.example.demo.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

@Component
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserInfo {
    private int id;
    private String username;
    private String password;
    private String mail;
    private String imgurl;
    private String code;        //即是登录时的验证码又是注册时的邮箱验证码!!

    public User toUser(){
        User user=new User(id,username,password,mail,imgurl);
        return user;
    }
}
